using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using System;
using System.Reflection;
using System.Security.Permissions;
using Components2.Sharepoint;

namespace Components2.CustomAdmin {

    public class CustomMasterPageClearReceiver : SPFeatureReceiver {

        public override void FeatureInstalled(SPFeatureReceiverProperties properties) {

        }

        public override void FeatureActivated(SPFeatureReceiverProperties properties) {
            SPSite site = properties.Feature.Parent as SPSite;
            SPWeb web = site.RootWeb;
            web.Properties[CustomMasterPageModule.CUSTOM_MASTER_PAGE] = string.Empty;
            web.Properties.Update();
        }

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties) {

        }

        public override void FeatureUninstalling(SPFeatureReceiverProperties properties) {

        }
    }
}